@model IEnumerable<AlphaWebsite.Models.DefaultBudgetItems>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            BudgetCategory
        </th>
        <th>
            Name
        </th>
        <th>
            EstimatedCost
        </th>
        <th>
            ActualCost
        </th>
        <th>
            AmountPaid
        </th>
        <th>
            AmountDue
        </th>
        <th>
            CostPercent
        </th>
        <th>
            IsFixPercent
        </th>
        <th>
            MinimumAmount
        </th>
        <th>
            Modified
        </th>
        <th>
            Created
        </th>
        <th>
            ModifedBy
        </th>
        <th>
            CreatedBy
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ItemID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ItemID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ItemID })
        </td>
        <td>
			@Html.DisplayTextFor(_ => item.BudgetCategory).ToString()
        </td>
        <td>
			@item.Name
        </td>
        <td>
			@String.Format("{0:F}", item.EstimatedCost)
        </td>
        <td>
			@String.Format("{0:F}", item.ActualCost)
        </td>
        <td>
			@String.Format("{0:F}", item.AmountPaid)
        </td>
        <td>
			@String.Format("{0:F}", item.AmountDue)
        </td>
        <td>
			@String.Format("{0:F}", item.CostPercent)
        </td>
        <td>
			@item.IsFixPercent
        </td>
        <td>
			@String.Format("{0:F}", item.MinimumAmount)
        </td>
        <td>
			@String.Format("{0:g}", item.Modified)
        </td>
        <td>
			@String.Format("{0:g}", item.Created)
        </td>
        <td>
			@item.ModifedBy
        </td>
        <td>
			@item.CreatedBy
        </td>
    </tr>
}

</table>


